-- GENERATED SPELL FOR [Thule Ravenclaw] --


function spell0_1947(pUnit, Event) --@Demon Armor,Self--
pUnit:FullCastSpellOnTarget(13787,pUnit)
pUnit:RegisterEvent('Sorts_1947', 0, 1)
end

function spell1_1947(pUnit, Event) --@Hex of Ravenclaw,n/a--
pUnit:FullCastSpellOnTarget(7655,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1947', 2000, 1)
end

function spell2_1947(pUnit, Event) --@Immolate,n/a--
pUnit:FullCastSpellOnTarget(20800,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1947', 23000, 1)
end

function spell3_1947(pUnit, Event) --@Summon Imp,Self--
pUnit:FullCastSpellOnTarget(11939,pUnit)
pUnit:RegisterEvent('Sorts_1947', 616, 1)
end

function Sorts_1947(pUnit, Event)
local choix_sorts_1947 = math.random(0, 3)
if choix_sorts_1947 == 0 then
pUnit:RegisterEvent('spell0_1947', 1, 1)
end
if choix_sorts_1947 == 1 then
pUnit:RegisterEvent('spell1_1947', 1, 1)
end
if choix_sorts_1947 == 2 then
pUnit:RegisterEvent('spell2_1947', 1, 1)
end
if choix_sorts_1947 == 3 then
pUnit:RegisterEvent('spell3_1947', 1, 1)
end
end

function mob1947_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1947', math.random(1500, 3000), 1)
end

function mob1947_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1947_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1947_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1947, 1, 'mob1947_Action')
RegisterUnitEvent(1947, 2, 'mob1947_Leave')
RegisterUnitEvent(1947, 3, 'mob1947_Kill')
RegisterUnitEvent(1947, 4, 'mob1947_Die')
